This specification relates to automated text composition.
Text composition includes laying out text within a frame of one or more pages of an electronic document. Text to be composed typically includes a number of individual paragraphs. Composition of the paragraphs includes a selection and a placement of line breaks to produce a visually pleasing appearance and positioning the paragraph within a page frame of the electronic document. Changes in the style of the text, e.g., fonts, formats, line heights, and point size, can complicate text composition. In addition, text styles and shape complexity can significantly increase computational overhead and processing time.
Techniques exist for determining line breaks in a paragraph (i.e., defining a paragraph layout) during text composition. For example, a single line composer determines line breaks in a line by line approach. Line by line techniques generally start with a first line, assign penalty values for possible breaks in that line, and choose the best possible line break for that line. After the first line is defined, a second line is analyzed and defined in a similar manner. Line by line techniques continue through a paragraph, defining each line and moving on to the next. Each paragraph is serially processed line by line until the entire text has been composed.
Another technique for determining line breaks is to use a paragraph composer. A paragraph composer considers each paragraph as a whole when determining line breaks for the paragraph. Consequently, a number of different line break schemes for the lines of the paragraph as a whole are considered. Each possible paragraph layout can have a penalty value. The paragraph composer selects the best paragraph layout (e.g., the line breaks for the lines of the paragraph that result in the lowest penalty). An example of composing paragraphs as a whole is described in U.S. Patent Application Publication No. 2003/0055851, which is incorporated by reference.
The composing information for each line, for example, the position of the line in the composition, the number of characters in the line, as well as line break data is stored in some software applications, e.g., in the Adobe® InDesign® application, in a structure referred to as a WaxLine. An undamaged WaxLine can be presented (e.g., displayed or printed). However, text associated with a damaged WaxLine must be recomposed to be presented. A WaxLine can become damaged, for example, by a modification in the line of text (e.g., as a result of a user input) or modifying a text frame.
To repair a damaged WaxLine, the paragraph composer generally backs up the composition from the line having the damaged WaxLine to the first line of the paragraph. The paragraph composer then recomposes the entire paragraph.